package com.niodata.dp.monitor.core.task.dao;

import com.niodata.dp.monitor.core.task.entity.TaskInfo;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface TaskMonitorMapper {

  @Select("select * from TASK_INFO")
  @ResultMap("componentsTaskResultMap")
  public List<TaskInfo> getAllTasks();

  @Select("select * from TASK_INFO where TASK_NAME=#{name}")
  @ResultMap("componentsTaskResultMap")
  public TaskInfo getTaskByName(@Param("name") String name);

}
